using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class Box : MonoBehaviour
{
	//点击事件
    public void OnMouseDown()
    {
        if (!GameManager.Instance.isRemove) return;
        if(!GameManager.Instance.isStart) return;
		Debug.Log(gameObject.name);
        if(transform.childCount > 0){
			Destroy(transform.GetChild(0).gameObject);
			Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
			GameManager.Instance.isRemove = false;
		}
    }
}
